1. Field of the Invention
The present invention relates to a numerical controller, and in particular, relates to a numerical controller performing speed control that suppresses excessive positioning deviation.
2. Description of the Related Art
During machining, there always arises a difference between a position command from a numerical controller controlling the machine and an actual position of a servo motor, which difference is referred to as a position deviation amount. When the position deviation amount exceeds a predefined allowable position deviation amount, the numerical controller generates a position deviation excess alarm and determines that the servo motor is in an abnormal state to shut the magnetization of the servo motor. Hence, the servo motor is thereby stopped without acceleration/deceleration.
In this case, the machine suffers shock due to the sudden stop of the servo motor. In the case of a gravitational axis, there is danger of its falling until a brake works. If it happens during the machining, the following problems would arise: a workpiece and/or a tool may be affected; recovery operation and/or determination of the cause may take time and extend the machining time; and so on. The allowable position deviation amount is determined by an operator using the following expression (1) and set to the numerical controller:ERR=V×(1−α)/PG  (1)where, ERR is the allowable position deviation amount, V is a feed speed, PG is a position gain of a servo, and α is a feedforward coefficient.
The allowable position deviation amount ERR is typically calculated and set based on a feed speed of approximately 1.2 times the fastest speed of rapid traverse with the position gain PG of the servo and the feedforward coefficient α being fixed values. Otherwise, it may separately be configurable for cutting.
In practice, however, the position gain PG of the servo and the feedforward coefficient α may be switched for use depending on the purpose (movement command and the like) how the servo motor is operated, for example, in cutting feed, in rapid traverse, in synchronizing the main spindle with the servo motor, and the like. Conventional techniques for preventing such problems occurring when the position deviation excess alarm arises are disclosed in Japanese Patent Application Laid-Open No. 2004-321000 and Japanese Patent Application Laid-Open No. 04-293107.
Japanese Patent Application. Laid-Open No. 2004-321000 discloses a technology of servo motor control in which deviations are created between a position command, a speed command and the like and their feedbacks and a current command based on the deviations is clamped at a predetermined current restriction value.
On the other hand, Japanese Patent Application Laid-Open No. 04-293107 discloses a technology in which only when excessive load is exerted on a feed motor, an appropriate speed value is calculated from an actual position deviation amount, a theoretical position deviation amount and a servo loop gain to clamp the speed on the basis of the appropriate speed value.
In the conventional techniques as described above, when the actual position deviation amount which is the feedback of the servo motor exceeds a predefined allowable position deviation amount, the alarm is generated, clamping is performed at a speed not exceeding the allowable position deviation amount, or the deviations are created between the position command, the speed command and the like and their feedbacks to clamp the current command at a predetermined current restriction value as servo control.
The allowable position deviation amount is obtained from the speed, the loop gain of the servo and the feedforward coefficient using the expression (1) above. Since the speed, loop gain and feedforward coefficient may be changed depending on the movement command or the like, these may be changed in accordance with the movement command or the like. Moreover, when the movement commands having a different loop gain of the servo or a different feedforward coefficient, as would be found in the cutting feed and the rapid traverse, are overlapped, the loop gain of the servo and the feedforward coefficient may be switched during overlapping.
Moreover, in a function used for a press machine or the like, the loop gain of the servo may be varying depending on the position during the movement performed by one movement command. In such a case, the allowable position deviation amount with respect to the feed speed at that time cannot be correctly checked, and the position deviation excess alarm may arise incorrectly.
In addition, in either of the technology disclosed in Japanese Patent Application Laid-Open No. 2004-321000 and the technology disclosed in Japanese Patent Application Laid-Open No. 04-293107 above, the feedback values such as the position feedback and the actual position deviation amount are checked. Hence, time lag may arise in checking, and the position deviation amount which has been fed back may exceed the position deviation amount which is wanted to be checked. Moreover, the current command and the speed have to be changed so that a position deviation amount does not exceed the allowable position deviation amount, based on the fed-back position deviation amount. Hence, there is a problem that operation cannot be achieved at the acceleration/deceleration which is desired to be under control.